// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 密码登录 POST /api/module/Auth/Login */
export async function authLogin(body: API.LoginInputModel, options?: { [key: string]: any }) {
  return request<API.Result1LoginOutputModel>('/api/module/Auth/Login', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 刷新令牌 POST /api/module/Auth/refresh-token */
export async function authRefreshToken(
  body: API.RefreshTokenInputModel,
  options?: { [key: string]: any },
) {
  return request<API.Result1LoginOutputModel>('/api/module/Auth/refresh-token', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 用户注册 POST /api/module/Auth/Register */
export async function authRegister(body: API.RegisterInputModel, options?: { [key: string]: any }) {
  return request<API.Result1Boolean>('/api/module/Auth/Register', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
